package com.lfnyxy.eenum;

/**
 * Created by ted on 18/3/2.
 */
public enum ProjectStatus {

    UN_ACTIVE(0, "未开始"),
    ACTICE(1, "发布中"),
    DONE(2, "已结束"),
    UNKNOW(999,"未知");

    ProjectStatus(int code, String content) {
        this.code = code;
        this.content = content;
    }

    private int code;
    private String content;

    public int getCode() {
        return code;
    }

    public String getContent() {
        return content;
    }

    public static ProjectStatus valueOf(int code){
        for(ProjectStatus item: values()){
            if(item.getCode() == code){
                return item;
            }
        }
        return UNKNOW;
    }

}
